package xddq

import (
	"fmt"
	D "websocket_apn/define"
	"websocket_apn/log"
	"websocket_apn/proto"
)

//处理仙桃乐宴事件信息
func (xd *XdDriver) CheckPeachBanquetInfoData(allInfo []D.PeachBanquetInfo) {
	for _, info := range allInfo {
		log.Infof("仙桃乐宴-开始入座【%s】的宴会", info.Name)
		xd.Send(proto.Get_Cmd_Data(xd.userInfo.PlayerId, proto.S_PEACH_BANQUET_SITDOWN, fmt.Sprintf("0A 24 %s 10 00", info.GiftID)))
	}
}

//处理仙桃乐宴加入信息
func (xd *XdDriver) CheckPeachBanquetJoinInfoData(info D.PeachBanquetJoinInfo) {
	if info.Flag {
		xd.UserData.PeachBanquetJoin = info
		log.Infof("仙桃乐宴-尘轩家宴[%d]次 仙阁雅宴[%d]次", info.A, info.B)
	}
}

//处理仙桃乐宴列表信息
func (xd *XdDriver) CheckPeachBanquetListInfoData(allInfo []D.PeachBanquetJoinInfo) {
	for _, info := range allInfo {
		log.Infof("仙桃乐宴-开始入座【%s】的宴会", info.Name)
		xd.Send(proto.Get_Cmd_Data(xd.userInfo.PlayerId, proto.S_PEACH_BANQUET_SITDOWN, fmt.Sprintf("0A 24 %s 10 00", info.GiftID)))
	}
}
